<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>02.元素浮动</title>
        <style>
            * {
                margin: 0;
                padding: 0;
                border: 0;
                list-style: none;
            }
            .wrap {
                width: 100%;
                border: 1px solid #f00;
                overflow: hidden;
                zoom: 1;
            }
            .wrap .kaykay {
                width: 250px;
                height: 250px;
                background-color: pink;
                float: left;
            }
            .wrap .yuyu {
                width: 150px;
                height: 150px;
                background-color: blue;
                float: left;
            }
        </style>
    </head>
    <body>
        <!--
            浮动的目的：让块级元素排到同一行去，实现我们要的布局效果
         -->
        <div class="wrap">
            <div class="kaykay"></div>
            <div class="yuyu"></div>
            <!--
                违背了结构、样式、行为三者分离的原则
            -->
            <!-- <br clear="all" /> -->
        </div>
    </body>
</html>
